//
//  SectionThreeCell.m
//  halfSweat
//
//  Created by 甘伟杰 on 16/5/15.
//  Copyright © 2016年 ganweijie. All rights reserved.
//
#define kMargin 15

#import "SectionThreeCell.h"
#import <UIButton+WebCache.h>
#import "RowItem.h"

@interface SectionThreeCell ()
@property (weak, nonatomic) IBOutlet UIButton *ADButton;

@end

@implementation SectionThreeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

+ (instancetype) viewForNib {
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}

- (void)setItem:(RowItem *)item {
    _item = item;
    
    [self.ADButton setImage:item.iconImage forState:UIControlStateNormal];
}

-(void)setFrame:(CGRect)frame {
    CGRect rect = frame;
    rect.origin.y += kMargin;
    rect.size.height -= kMargin;
    frame = rect;
    
    [super setFrame:frame];
}


@end
